package com.example.leetcode.util;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

public class FileUtil {

    static FileOutputStream fos;

    public static synchronized boolean addFile(String path) throws IOException {
        fos = new FileOutputStream(new File(path));
        fos.write("HelloWorld".getBytes());
        return false;
    }

    public static void main(String[] args) throws IOException {
        FileUtil.addFile("d:/tmp/test1.txt");
        FileUtil.addFile("d:/tmp/test2.txt");
    }
}
